<?php echo $header; ?>
<?php echo $column_left; ?>
<div id="content">
  
    <!--顶部-->
  <div class="page-header">
    <div class="container-fluid">
          
            <!--右上操作按钮-->
      <div class="pull-right">
         <!--      <a href="<?php echo $add; ?>" data-toggle="tooltip" title="<?php echo $button_add; ?>" class="btn btn-primary"><i class="fa fa-plus-circle"></i></a> -->
<!--                 <button id="btn-enables" toaction="<?php echo $enable_action; ?>" type="button" data-toggle="tooltip" title="批量作废" class="btn btn-success"><i class="fa fa-play"></i></button>
            <button id="btn-disables" toaction="<?php echo $disable_action; ?>" type="button" data-toggle="tooltip" title="批量解除作废" class="btn btn-danger"><i class="fa fa-ban"></i></button> -->
      </div>
            <!--右上操作按钮-->
            
          <h1><?php echo $heading_title; ?></h1>
            
            <!--面包屑导航-->
        <ul class="breadcrumb">
            <?php foreach ($breadcrumbs as $breadcrumb) { ?>
            <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
            <?php } ?>
          </ul>
            <!--面包屑导航-->
            
    </div>
  </div>
    <!--顶部-->
    
    <!--内容-->
    <div class="container-fluid">
    
      <!--警示消息区-->
      <?php if ($error_warning) { ?>
    <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> <?php echo $error_warning; ?>
          <button type="button" class="close" data-dismiss="alert">&times;</button>
      </div>
      <?php } ?>
      <?php if ($success) { ?>
      <div class="alert alert-success"><i class="fa fa-check-circle"></i> <?php echo $success; ?>
          <button type="button" class="close" data-dismiss="alert">&times;</button>
      </div>
      <?php } ?>
      <!--警示消息区-->
      
        <!--列表-->
      <div class="panel panel-default">


          <div class="table-responsive">
          <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-list"></i> 应付</h3>
          </div>

           <table class="table table-bordered table-hover">
              <thead>
                <tr>
                  <td>应付款项ID</td>
                  <td>相关单据类型</td>
                  <td>相关单据号</td>
                  <td>相关单金额</td>
                  <td>应付金额</td>
                  <td>实付金额</td>
                  <td>收款人</td>
                  <td>状态</td>
                  <td>支付时间</td>
                  <td>创建时间</td>
                </tr>
              </thead>
                <tbody>
                  <?php if ($money_out) { ?>
                  <?php foreach ($money_out as $money) { ?>
                  <tr >
                    <td><?php echo $money['money_out_id'] ?></td>
                    <td><?php echo $money['name'] ?></td>
                    <td><?php echo $money['refer_id'] ?></td>
                    <td><?php echo $money['refer_total'] ?></td>
                    <td><?php echo $money['payables'] ?></td>
                    <td><?php echo $money['paid']?></td>
                    <td><?php echo $money['payee']?></td>
                    <td><?php echo $money['status_name']?></td>
                    <td><?php echo $money['pay_time'] ?></td>
                    <td><?php echo $money['date_added'] ?></td>
                    
                  </tr>
                  <?php } ?>
                  <?php } else { ?>
                  <tr>
                    <td class="text-center" colspan="6">没有数据</td>
                  </tr>
                  <?php } ?>
                </tbody>
            </table>

             <div class="panel panel-default">
                <div class="panel-heading">
                  <h3 class="panel-title"><i class="fa fa-comment-o"></i>  金额</h3>
                </div>
                <div class="panel-body">
                  <div class="tab-content">
                    <div class="tab-pane active">
                      <fieldset>
                        <legend></legend>
                        <form class="form-horizontal">

                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="input-difference">应付总金额</label>
                            <label class="col-sm-2 control-label" for="input-difference" style="color: red;"><?php echo '¥'.$total; ?></label>
        
                          </div>

                          <div class="form-group">
                            <label class="col-sm-2 control-label" for="input-difference">打款金额</label>
                            <div class="col-sm-4" ng-init='difference="<?php echo $vendor_bill['total']+$vendor_bill['difference'] ?>"'>
                              <input name="difference" ng-model="difference" id="input-difference" class="form-control" type="text" ></input>
                            </div>
                            <div class="col-sm-2">
                              <a class="hidden" href="#" id="gotoyjf" target="_blank"></a>
                              <input name="vendor_bill_id" ng-model="vendor_bill_id"  class="hidden" type="text" value="<?php echo $vendor_bill['vendor_bill_id']?>"></input>
                              <button id="button-change" data-loading-text="加载中..." ng-click="getmoney('<?php echo $token ?>')" class="btn btn-primary"><i class="fa fa-cny"></i> 确认打款</button>
                            </div>
                          </div>
                        </form>
                      </fieldset>
                    </div>
                    </div>
                </div>
              </div>


          </div>
          <div class="row">
            <div class="col-sm-6 text-left"><?php echo $pagination; ?></div>
          </div>
          <div class="col-sm-6 text-right"><?php echo $results; ?></div>
      </div>
            <!--列表内容-->
            
    </div>
        <!--列表-->
        
  </div>
  <!--内容-->
  
</div>

<script type="text/javascript">
  


$('.date').datetimepicker({
  pickTime: false
});
</script>
<?php echo $footer; ?>